<?php
//Check for IE6
/*if 	(isset($_SERVER['SERVER_NAME']) &&
	(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE)){*/
if  (isset($_SERVER['SERVER_NAME']) &&
 (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE) &&
        (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.') === FALSE) &&
               (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.') === FALSE)) {
	header('Location: http://ayalim.loo.co.il/css/killie6/killIE6.html');
	die();
}

// link to the yii framework
$yii=dirname(__FILE__).'/../yii-1.1.1/framework/yii.php';

// remove the following line when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

// Config file shared by both Web & Console Applications
$config=include(dirname(__FILE__).'/protected/config/shared.php');

require_once($yii);

if (!isset($_SERVER['SERVER_NAME']))
{
    $console_config=include(dirname(__FILE__).'/protected/config/console.php');
    Yii::createConsoleApplication(CMap::mergeArray($config,$console_config))->run();
}
else
{
    $web_config=include(dirname(__FILE__).'/protected/config/web.php');
    Yii::createWebApplication(CMap::mergeArray($config,$web_config))->run();
}